pkgname=vdr-newsticker
pkgver=0.0.4
pkgrel=1
arch=('i686')
pkgdesc="A VDR plugin that downloads RDF feeds and displays them as OSD"
url="http://www.wontorra.net/staticpages/index.php?page=newsticker"
license=('GPL')
depends=('vdr' 'gcc')
source=(http://www.wontorra.net/filemgmt_data/files/$pkgname-$pkgver.tar.gz \
	vdr-newsticker-tmp.diff vdr-newsticker-gcc4.diff)
md5sums=('10c007b30d73fcf78a197f7628e9024f' 'f654704a26008f33b3e9b103f4d64327'\
         '13eaf41872e32fc6b6839ccdae874d68')

build() {
  cd $startdir/src/newsticker-$pkgver

  patch -Np1 -i $startdir/src/vdr-newsticker-gcc4.diff || return 1
  patch -Np1 -i $startdir/src/vdr-newsticker-tmp.diff || return 1

  sed -i \
	 -e 's:@cp $@ :install -D -m 755 $@ $(DESTDIR):' \
	 -e 's:VDRVERSION:APIVERSION:g' \
	 Makefile
  make VDRDIR=/usr/include/vdr LIBDIR=/usr/lib/vdr DESTDIR=$startdir/pkg all || return 1

  install -m 755 -d $startdir/pkg/var/cache/newsticker
  chown vdr.video $startdir/pkg/var/cache/newsticker
}
